<?php
class Back_Form_TypeContact extends Jnd_Form
{

    public function __construct( $decorateur = "Formulairejndpro", $options = null )
    {
        parent::__construct($decorateur, $options);
        $this->setElementDecorators(array(
            "$decorateur"
        ), array(), false);
    }

    public function init()
    {
        $this->setAction('/back/config/editiontypecontact');
        $this->setName("typecontact");
        $this->setMethod("post");
        $this->addAttribs(array(
            "class" => "cssform"
        ));
        
        $champ = new Zend_Form_Element_Hidden("id");
        $champs[] = $champ;
        
        $champ = new Zend_Form_Element_Text("nom");
        $champ->setLabel(__("Nom"));
        $champ->setRequired(true);
        $champs[] = $champ;
        
        $champ = new Zend_Form_Element_Radio("modeContact");
        $champ->setLabel(__("Les contact est un"));
        $champ->setDescription(__('Indiquer si le contact est un groupe ou un utilisateur'));
        $champ->setMultiOptions(array(
            "groupe" => __("groupe"), 
            "utilisateur" => __("utilisateur")
        ));
        $champs[] = $champ;
        
        $champ = new Zend_Form_Element_Text("aContacter");
        $champ->setLabel(__("A contacter"));
        $champs[] = $champ;
        
        $this->addElements($champs);
    }
}

